package org.yx.service.sqcm.view_ocv_standard;

import com.xiaoleilu.hutool.bean.BeanUtil;
import org.dbist.dml.Page;
import org.yx.utils.BaseService;

import java.util.Map;

/**
 * 查询OCV工艺标准
 *
 * @author zxw
 * @since 2023/03/17
 **/
public class SqcmViewOcvStandardService extends BaseService {
    public SqcmViewOcvStandardOut viewOcvStandard(SqcmViewOcvStandardIn in) throws Exception {
        Map<String,Object> parm = BeanUtil.beanToMap(in);
        parm.put("orgCode",in.getUserOrgCode());
        Page<QcmOcvStandard> stdPage = selectPageBySqlFilePath("select_qcm_ocv_standard", parm, QcmOcvStandard.class, in.getPageIndex(), in.getPageSize());

        SqcmViewOcvStandardOut out = new SqcmViewOcvStandardOut();
        out.setOcvStdList(stdPage.getList());
        out.setTotal(stdPage.getTotalSize());

        return out;
    }
}